import React, { Component } from 'react'
import './index.scss'
import {withRouter} from 'react-router-dom'
import '../../font/iconfont.css'
class Header extends Component {
  render() {
    const{history}=this.props
    return (
      <div className='header'>
       <div className="headerLogo" onClick={()=>{history.push('/')}}></div>
       <div className="headerSearch">
       <span className='iconfont icon-fangdajing'></span>
         <input type="text" placeholder='搜索商品，共36122款好物' onKeyDown={(e)=>{
           if(e.keyCode===13){
             console.log(e.target.value);
             e.target.value="";
           }
         }}></input>
       </div>
       <div className="headerLogin" onClick={()=>{history.push('/login')}}>登录</div>
      </div>
    )
  }
}
export default withRouter(Header)